home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 186 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: Norway.EU.net!usenet
  2. From: patrick.hanevold@login.eunet.no (Patrick Hanevold)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: FPU speeds
  5. Date: 4 Jan 1996 10:48:14 GMT
  6. Organization: EUnet Norway
  7. Message-ID: <1552.6577T703T244@login.eunet.no>
  8. References: <30d1d30a@gauss.demon.co.uk> <38231758@kone.fipnet.fi>
  9.     <468.6564T132T2527@ifi.uio.no> <38231779@kone.fipnet.fi>
  10. NNTP-Posting-Host: pc3.asker-pm2-1.eunet.no
  11. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  12.  
  13.  
  14. >> The sign test i a peace of cake! ;)) Log can easly be done without a
  15. >> sign test.
  16. >> But multiply with ZERO and you are in trouble! :)
  17. Nope. ZERO works fine. :)
  18.  
  19. >Well, anyway.. I dont think logs are useful replacing muls/divs
  20. >with adds and subs because of the trouble and actually
  21. >I bet few instructions (add/move/memory access, tst) are
  22. >not faster than a muls.
  23. Hi Nose. (I'm Luddes friend.)
  24. Her's my log rotate loop.
  25.  
  26. .Loop   move.l  a2,a3
  27.         move.l  (a1)+,d2
  28.         move.l  (a1)+,d3
  29.         move.l  (a1)+,d4
  30.  
  31. ; d2=Log(X) d3=Log(Y) d4=Log(Z)
  32. ; a3=Log(Matrix)
  33. ; a5=AntiLog
  34. ; a6=Coords
  35.  
  36.         move.l  d2,d0
  37.         add.l   (a3)+,d0
  38.         move.l  (a5,d0.l*4),d0
  39.         move.l  d3,d5
  40.         add.l   (a3)+,d5
  41.         add.l   (a5,d5.l*4),d0
  42.         move.l  d4,d5
  43.         add.l   (a3)+,d5
  44.         add.l   (a5,d5.l*4),d0
  45.         sub.l   CameraPos,d0
  46.         move.l  d0,(a6)+
  47.  
  48.         move.l  d2,d1
  49.         add.l   (a3)+,d1
  50.         move.l  (a5,d1.l*4),d1
  51.         move.l  d3,d5
  52.         add.l   (a3)+,d5
  53.         add.l   (a5,d5.l*4),d1
  54.         move.l  d4,d5
  55.         add.l   (a3)+,d5
  56.         add.l   (a5,d5.l*4),d1
  57.         sub.l   CameraPos+4,d1
  58.         move.l  d1,(a6)+
  59.  
  60.         add.l   (a3)+,d2
  61.         move.l  (a5,d2.l*4),d2
  62.         add.l   (a3)+,d3
  63.         add.l   (a5,d3.l*4),d2
  64.         add.l   (a3),d4
  65.         add.l   (a5,d4.l*4),d2
  66.         sub.l   CameraPos+8,d2
  67.         move.l  d2,(a6)+
  68.  
  69.         dbra    d7,.Loop
  70.  
  71. <sb>Patrick Hanevold - Virtual Reality developer
  72. <sb>patrick.hanevold@login.eunet.no
  73. <sb>Amiga and official Be developer
  74.  
  75.